package com.mda.core;

import com.mda.log.Logger;
import com.mda.utils.ExceptionUtils;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import java.net.URISyntaxException;

/**
 * Created by Administrator on 13-12-8.
 */
public final class MdaListener implements ServletContextListener {
    @Override
    public void contextInitialized(ServletContextEvent servletContextEvent) {
        try {
            MdaConfig.init();
        } catch (Exception e) {
            String track = ExceptionUtils.getTrack(e, "MDA initialization failed.");
            System.err.println(track);
            return;
        }
        Logger logger = Logger.getLogger(MdaListener.class);
        if (logger.isDebugEnabled()) {
            logger.debug("The log has completed initialization.");
        }


    }

    @Override
    public void contextDestroyed(ServletContextEvent servletContextEvent) {

    }
}
